package com.ruoyi.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

/**
 * 用户企业微信表
 * @TableName sys_user_enterprise
 */
@TableName(value ="sys_user_enterprise")
public class SysUserEnterprise implements Serializable {
    /**
     * 用户ID，关联sys_user的id
     */
    @TableId
    private Long userId;

    /**
     * 企业ID，关联sys_enterprise的id
     */

    private Long enterpriseId;

    /**
     * 企业微信的企业ID
     */
    private String enterpriseCorpId;

    /**
     * 企业名称
     */
    private String enterpriseName;

    /**
     * 企业微信用户ID（字符串）
     */
    private String enterpriseUserId;

    /**
     * 企业微信用户昵称
     */
    private String enterpriseNickname;

    /**
     * 企业微信部门ID
     */
    private Long enterpriseDeptId;

    /**
     * 企业微信部门名称
     */
    private String enterpriseDeptName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID，关联sys_user的id
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * 用户ID，关联sys_user的id
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * 企业ID，关联sys_enterprise的id
     */
    public Long getEnterpriseId() {
        return enterpriseId;
    }

    /**
     * 企业ID，关联sys_enterprise的id
     */
    public void setEnterpriseId(Long enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    /**
     * 企业微信的企业ID
     */
    public String getEnterpriseCorpId() {
        return enterpriseCorpId;
    }

    /**
     * 企业微信的企业ID
     */
    public void setEnterpriseCorpId(String enterpriseCorpId) {
        this.enterpriseCorpId = enterpriseCorpId;
    }

    /**
     * 企业名称
     */
    public String getEnterpriseName() {
        return enterpriseName;
    }

    /**
     * 企业名称
     */
    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    /**
     * 企业微信用户ID（字符串）
     */
    public String getEnterpriseUserId() {
        return enterpriseUserId;
    }

    /**
     * 企业微信用户ID（字符串）
     */
    public void setEnterpriseUserId(String enterpriseUserId) {
        this.enterpriseUserId = enterpriseUserId;
    }

    /**
     * 企业微信用户昵称
     */
    public String getEnterpriseNickname() {
        return enterpriseNickname;
    }

    /**
     * 企业微信用户昵称
     */
    public void setEnterpriseNickname(String enterpriseNickname) {
        this.enterpriseNickname = enterpriseNickname;
    }

    /**
     * 企业微信部门ID
     */
    public Long getEnterpriseDeptId() {
        return enterpriseDeptId;
    }

    /**
     * 企业微信部门ID
     */
    public void setEnterpriseDeptId(Long enterpriseDeptId) {
        this.enterpriseDeptId = enterpriseDeptId;
    }

    /**
     * 企业微信部门名称
     */
    public String getEnterpriseDeptName() {
        return enterpriseDeptName;
    }

    /**
     * 企业微信部门名称
     */
    public void setEnterpriseDeptName(String enterpriseDeptName) {
        this.enterpriseDeptName = enterpriseDeptName;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysUserEnterprise other = (SysUserEnterprise) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getEnterpriseId() == null ? other.getEnterpriseId() == null : this.getEnterpriseId().equals(other.getEnterpriseId()))
            && (this.getEnterpriseCorpId() == null ? other.getEnterpriseCorpId() == null : this.getEnterpriseCorpId().equals(other.getEnterpriseCorpId()))
            && (this.getEnterpriseName() == null ? other.getEnterpriseName() == null : this.getEnterpriseName().equals(other.getEnterpriseName()))
            && (this.getEnterpriseUserId() == null ? other.getEnterpriseUserId() == null : this.getEnterpriseUserId().equals(other.getEnterpriseUserId()))
            && (this.getEnterpriseNickname() == null ? other.getEnterpriseNickname() == null : this.getEnterpriseNickname().equals(other.getEnterpriseNickname()))
            && (this.getEnterpriseDeptId() == null ? other.getEnterpriseDeptId() == null : this.getEnterpriseDeptId().equals(other.getEnterpriseDeptId()))
            && (this.getEnterpriseDeptName() == null ? other.getEnterpriseDeptName() == null : this.getEnterpriseDeptName().equals(other.getEnterpriseDeptName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getEnterpriseId() == null) ? 0 : getEnterpriseId().hashCode());
        result = prime * result + ((getEnterpriseCorpId() == null) ? 0 : getEnterpriseCorpId().hashCode());
        result = prime * result + ((getEnterpriseName() == null) ? 0 : getEnterpriseName().hashCode());
        result = prime * result + ((getEnterpriseUserId() == null) ? 0 : getEnterpriseUserId().hashCode());
        result = prime * result + ((getEnterpriseNickname() == null) ? 0 : getEnterpriseNickname().hashCode());
        result = prime * result + ((getEnterpriseDeptId() == null) ? 0 : getEnterpriseDeptId().hashCode());
        result = prime * result + ((getEnterpriseDeptName() == null) ? 0 : getEnterpriseDeptName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", enterpriseId=").append(enterpriseId);
        sb.append(", enterpriseCorpId=").append(enterpriseCorpId);
        sb.append(", enterpriseName=").append(enterpriseName);
        sb.append(", enterpriseUserId=").append(enterpriseUserId);
        sb.append(", enterpriseNickname=").append(enterpriseNickname);
        sb.append(", enterpriseDeptId=").append(enterpriseDeptId);
        sb.append(", enterpriseDeptName=").append(enterpriseDeptName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
